//
//  LookFeel.swift
//  DownloadTube
//
//  Created by Carlos on 03/11/14.
//  Copyright (c) 2014 Noname. All rights reserved.
//

import UIKit

class LookAndFeel: NSObject {
   
    struct style {
        
        static let mainColor = Utils.colorWithHexString("3B5A97") // Utils.colorFromRGB(0.0, green: 117.0, blue: 246.0) //
        static let secondaryColor = Utils.colorFromRGB(51.0, green: 51.0, blue: 51.0)
        static let rojoOscuro = Utils.colorFromRGB(158.0, green: 12.0, blue: 57.0)
        static let verdeOscuro = Utils.colorFromRGB(24.0, green: 155.0, blue: 137.0)
        static let turquesa = Utils.colorFromRGB(15, green: 146, blue: 191)
        
        static let greenApple = Utils.colorFromRGB(76, green: 217, blue: 100)
        static let orangeApple = Utils.colorFromRGB(255, green: 149, blue: 0)
        static let darkBlueApple = Utils.colorFromRGB(0, green: 127, blue: 255)
        static let clearBlueApple = Utils.colorFromRGB(90, green: 200, blue: 250)
        static let yellowApple = Utils.colorFromRGB(255, green: 204, blue: 0)
        static let redApple = Utils.colorFromRGB(255, green: 59, blue: 48)
        static let grayApple = Utils.colorFromRGB(142, green: 142, blue: 147)
        static let pinkApple = Utils.colorFromRGB(255, green: 45, blue: 85)
        
        
        static let titleBarFont:NSDictionary = [NSFontAttributeName:UIFont.boldSystemFontOfSize(17.0), NSForegroundColorAttributeName:UIColor.whiteColor()]
       
        static let loadingImage = UIImage(named: "loading_thumbnail.png")
    
        static let titleCellColor = Utils.colorWithHexString("224488")
        static let titleCellFont = UIFont (name: "Helvetica-Bold", size: 13)
        static let subtitleCellColor = Utils.colorWithHexString("3f3f3f")
        static let subtitleCellFont = UIFont (name: "Helvetica", size: 12)
        static let subtitleMiniCellColor = Utils.colorWithHexString("7f7f7f")
        static let subtitleMiniCellFont = UIFont (name: "HelveticaNeue", size: 11)
        static let textMoreDataCellColor = rojoOscuro
        static let textMoreDataCellFont = UIFont (name: "Helvetica-Bold", size: 16)
        static let backgroundColorMoreDataCell = Utils.colorWithHexString("fdfdfd")
        
        static let titleEmptyViewAttributes = [NSFontAttributeName:UIFont(name: "Helvetica", size: 23)!, NSForegroundColorAttributeName:Utils.colorWithHexString("6f6f6f")]
        
        static let descriptionEmptyViewAttributes = [NSFontAttributeName:UIFont(name: "HelveticaNeue", size: 20)!, NSForegroundColorAttributeName:Utils.colorWithHexString("8f8f8f")]

    }
    
    override init(){
    
        let navigationBarApp = UINavigationBar.appearance()
        navigationBarApp.barTintColor = style.mainColor
        navigationBarApp.tintColor = Utils.colorWithHexString("DA9966")
        navigationBarApp.titleTextAttributes = style.titleBarFont
        
        let tabBarApp = UITabBar.appearance()
        tabBarApp.barTintColor = Utils.colorWithHexString("dfdfdf")
        tabBarApp.tintColor = style.mainColor
       
        let searchBarApp = UISearchBar.appearance()
        searchBarApp.barTintColor = Utils.colorWithHexString("afafaf")
        
        let tableViewCellApp = UITableViewCell.appearance()
        tableViewCellApp.backgroundColor = Utils.colorWithHexString("fdfdfd")
        
        let tableViewApp = UITableView.appearance()
        tableViewApp.backgroundColor = Utils.colorWithHexString("dfdfdf")
        
        AppearanceWhenContainedIn.setAppearance()
        
        let barButtonItemApp = UIBarButtonItem.appearance()
    }
}
